package com.exam.demo.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName rent
 */
@TableName(value ="rent")
@Data
public class Rent implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 
     */
    private Integer linkId;

    /**
     * 
     */
    private String rentDate;

    /**
     * 
     */
    private String rentBack;

    /**
     * 
     */
    private String rentUser;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Rent other = (Rent) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getLinkId() == null ? other.getLinkId() == null : this.getLinkId().equals(other.getLinkId()))
            && (this.getRentDate() == null ? other.getRentDate() == null : this.getRentDate().equals(other.getRentDate()))
            && (this.getRentBack() == null ? other.getRentBack() == null : this.getRentBack().equals(other.getRentBack()))
            && (this.getRentUser() == null ? other.getRentUser() == null : this.getRentUser().equals(other.getRentUser()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getLinkId() == null) ? 0 : getLinkId().hashCode());
        result = prime * result + ((getRentDate() == null) ? 0 : getRentDate().hashCode());
        result = prime * result + ((getRentBack() == null) ? 0 : getRentBack().hashCode());
        result = prime * result + ((getRentUser() == null) ? 0 : getRentUser().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", linkId=").append(linkId);
        sb.append(", rentDate=").append(rentDate);
        sb.append(", rentBack=").append(rentBack);
        sb.append(", rentUser=").append(rentUser);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}